package Vue;

import java.awt.Color;
import java.awt.Graphics;
import java.util.Observable;
import java.util.Observer;

import javax.sound.midi.ControllerEventListener;
import javax.sound.midi.ShortMessage;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;

import Controllers.ControllerVue;
import Lecteurs.LecteurObservable;

public class Panneau extends JFrame implements Observer{

	private MonPanel ml;
	private ControllerVue controller;
	
	public Panneau(ControllerVue controller,Observable lecteur){
		
		this.controller = controller ;
		installerIHM();
		lecteur.addObserver(this);

	}
	
	public  void installerIHM() {
		
		this.setTitle("Mon nouveau clip video");
		ml = new MonPanel();
		this.setContentPane(ml);
		this.setBounds(30,30, 300,300);
		this.setVisible(true);
	}
	
	@Override
	public void update(Observable arg0, Object arg1) {
		repaint();
	}
	
	public void paintComponent(Graphics g) {
		ml.repaint();
	}
}
